<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:title="${title}"></title>
</head>
<body>
<div id="b">
    <div id="all" style="padding-top: 20px">
        <div id="content">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <!-- breadcrumb-->
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <i class="fa fa-eye" style="padding-top: 2px"></i>当前位置:&nbsp;&nbsp;
                                <li class="breadcrumb-item"><a href="/">主页</a></li>
                                <li class="breadcrumb-item"><a href="/customer/personalCenter">个人中心</a></li>
                                <li class="breadcrumb-item"><a href="/saleList/mySaleList/list/1">我的订单</a></li>
                                <li class="breadcrumb-item"><span th:text="${title}"></span>(<span
                                        style="color: #0c9c6e" th:text="${saleList.saleNumber}"></span>)
                                </li>
                            </ol>
                        </nav>
                    </div>
                    <div class="col-lg-3">
                        <div th:include="page/customer/menuLeft::#m"></div>
                    </div>
                    <div id="blog-post" class="col-lg-9">
                        <form action="/saleListPaymentInformation/pay" method="post">
                            <div class="box">
                                <div class="table-responsive mb-4">
                                    <table class="table">
                                        <thead>
                                        <tr>
                                            <th style="text-align: center">商品图片</th>
                                            <th style="text-align: center">商品名称</th>
                                            <th style="text-align: center">数量</th>
                                            <th style="text-align: center">单价</th>
                                            <th style="text-align: center">折扣</th>
                                            <th style="text-align: center">小计</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr th:each="saleListGoods:${saleList.getSaleListGoodsList()}">
                                            <td style="text-align: center"><a
                                                    th:href="@{'/goods/'+${saleListGoods.getGoodsId()}}"><img
                                                    th:src="@{'/static/images/goodsImage/'+${saleListGoods.getGoods().getImageName()}}"
                                                    style="height: 40px;width: 40px" alt="图片不存在或已删除"></a></td>
                                            <td style="text-align: center"><a
                                                    th:href="@{'/goods/'+${saleListGoods.getGoodsId()}}"
                                                    th:title="${saleListGoods.name}"><span
                                                    th:text="${#strings.abbreviate(saleListGoods.getName(),25)}"></span></a>
                                            </td>
                                            <td style="text-align: center"><span th:text="${saleListGoods.num}"></span></td>
                                            <td style="text-align: center">￥<span th:text="${saleListGoods.price}"></span>
                                            </td>
                                            <td style="text-align: center">￥0.0</td>
                                            <td style="text-align: center">￥<span th:text="${saleListGoods.total}"></span>
                                            </td>
                                        </tr>
                                        </tbody>
                                        <div class="form-inline">
                                            <p style="font-size: 15px">订单号:</p>&nbsp;<p style="font-size: 15px"
                                                                                        th:text="${saleList.saleNumber}"></p>
                                            <p style="margin-left: 20px;font-size: 15px">创建时间:</p>&nbsp;<p
                                                style="font-size: 15px"
                                                th:text="${#dates.format(saleList.saleDate,'yyyy-MM-dd HH:mm:ss')}"></p>
                                            <p style="margin-left: 20px;font-size: 15px">订单状态:</p>&nbsp;
                                            <p style="font-size: 15px" th:if="${saleList.state==1}">已支付</p>
                                            <p style="font-size: 15px;color: red" th:if="${saleList.state==2}">未支付</p>
                                            <p style="font-size: 15px" th:if="${saleList.state==3}">已发货</p>
                                            <p style="font-size: 15px" th:if="${saleList.state==4}">派送中</p>
                                            <p style="font-size: 15px" th:if="${saleList.state==5}">已收货</p>
                                            <p style="font-size: 15px;color: #6b3f78" th:if="${saleList.state==6}">已取消</p>
                                        </div>
                                        <div class="form-inline">
                                            <p style="font-size: 15px">收货人:</p>&nbsp;<p style="font-size: 15px"
                                                                                        th:text="${session.currentCustomer.getContact()}"></p>
                                            <p style="margin-left: 20px;font-size: 15px">收货地址:</p>&nbsp;<p
                                                style="font-size: 15px"
                                                th:text="${session.currentCustomer.getAddress()}"></p>
                                            <p style="margin-left: 20px;font-size: 15px">联系电话:</p>&nbsp;<p
                                                style="font-size: 15px"
                                                th:text="${session.currentCustomer.getNumber()}"></p>
                                        </div>
                                        <tfoot>
                                        <tr>
                                            <th colspan="5" class="text-right" style="color: blue">商品总价</th>
                                            <th th:if="${saleList.amountPaid>=88}">￥<span th:text="${saleList.amountPaid}"></span></th>
                                            <th th:if="${saleList.amountPaid<88}">￥<span th:text="${saleList.amountPaid+(-10)}"></span></th>
                                        </tr>
                                        <tr>
                                            <th colspan="5" class="text-right" style="color: #0c9c6e">运费</th>
                                            <th th:if="${saleList.amountPaid<88}">￥10.0</th>
                                            <th th:if="${saleList.amountPaid>=88}">￥0.0</th>
                                        </tr>
                                        <tr>
                                            <th colspan="5" class="text-right" style="color: orangered">总计</th>
                                            <th>￥<span th:text="${saleList.amountPaid}"></span></th>
                                        </tr>
                                        </tfoot>
                                    </table>
                                    <div class="form-inline form-group">
                                        <span style="font-size: 15px">支付金额:</span>&nbsp;&nbsp;
                                        <span style="font-size: 15px">￥</span>
                                        <span th:text="${saleList.amountPaid}"></span>
                                    </div>
                                    <div class="form-inline form-group">
                                        <span style="font-size: 15px">支付方式:</span>&nbsp;&nbsp;
                                        <div class="radio">
                                            <label><input type="radio" name="type" value="1" checked><span style="font-size: 15px">支付宝支付</span></label>
                                        </div>&nbsp;
                                        <div class="radio">
                                            <label><input type="radio" name="type" value="2"><span style="font-size: 15px">微信支付</span></label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label style="font-size: 15px">订单备注:</label>
                                        <textarea id="remark" name="remark" type="text" rows="3"
                                                  class="form-control" placeholder="可不填..."></textarea>
                                    </div>
                                    <input id="saleNumber" name="saleNumber" type="hidden" th:value="${saleList.saleNumber}">
                                    <input id="amount" name="amount" type="hidden" th:value="${saleList.amountPaid}">
                                </div>
                                <div class="box-footer d-flex justify-content-between flex-column flex-lg-row">
                                    <div class="left"></div>
                                    <div class="right">
                                        <button type="submit" class="btn btn-success" th:if="${saleList.state==2}"> 立即支付<i class="fa fa-chevron-right"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- /.box-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>